package com.asset.dispoal.business.mediation.api;

import com.asset.dispoal.business.mediation.dto.CalculateRateRequest;
import com.asset.dispoal.business.mediation.dto.CalculateRateResponse;
import com.asset.dispoal.business.mediation.dto.MediationRequest;
import com.asset.dispoal.business.mediation.dto.MediationResponse;
import com.asset.dispoal.business.mediation.dto.ReduceDtailInfoResponse;
import com.asset.dispoal.business.mediation.dto.ReduceLogsResponse;
import com.asset.dispoal.business.mediation.dto.ReducePresetResponse;
import com.asset.dispoal.business.mediation.dto.SaveReduceInfoRequest;
import org.springframework.web.multipart.MultipartFile;
import tech.mhuang.pacebox.springboot.protocol.Result;
import tech.mhuang.pacebox.springboot.protocol.data.PageVO;

import java.util.List;

/**
 * @author: yf
 * @date: 2022-08-23
 */
public interface MediationService {
    /**
     * 分页查询借款人信息
     *
     * @param mediationRequest
     * @return
     */
    Result<PageVO<MediationResponse>> queryBorrowerCaseByPage(MediationRequest mediationRequest);

    /**
     * 根据案件Id查询合同列表
     *
     * @param caseId
     * @return
     */
    Result<ReducePresetResponse> getAgreeMentCaseListByCaseId(String caseId);

    /**
     * 保存减免预设所有信息
     *
     * @param request
     * @return
     */
    Result save(SaveReduceInfoRequest request);

    /**
     * 根据案件id获取减免记录列表
     *
     * @param caseId
     * @return
     */
    Result<List<ReduceLogsResponse>> getLogList(String caseId);

    /**
     * 根据id获取减免记录详情
     *
     * @param id
     * @return
     */
    Result<ReduceDtailInfoResponse> getReduceDetailInfo(String id);

    /**
     * 利率减免方法计算
     *
     * @param request
     * @return
     */
    Result<CalculateRateResponse> calculate(CalculateRateRequest request);

    /**
     * 保存和解信息
     *
     * @param reconcileFiles
     * @param caseId
     */
    void reconcile(List<MultipartFile> reconcileFiles, String caseId);

    /**
     * 根据案件id获取最新的减免预设记录
     *
     * @param caseId
     * @return
     */
    Result<ReduceDtailInfoResponse> getOneReduceDetail(String caseId);
}
